__metaclass__ = type

from lex import token

class Node:

    def __init__(self, **kw):
        self.local = None
        self.type = None
        self.code = []
        self.__dict__.update(kw)

    def __repr__(self):
        tokname = token.tok_name[self.token_type]
        return '<Node %s %s>' % (tokname, self.token)
